<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>.lazy：绑定触发由oninput改为了onchange</li>
        <li>.trim：（推荐使用），自动去除字符串左右的空格</li>
        <li>.number：使用parseFloat将内容转为数值</li>
    </ul>
    <main id="app">
        姓名：<input type="text" v-model.lazy="formData.name"><span>“{{formData.name}}”</span><br/>
        英文名：<input type="text" v-model.trim="formData.englishName"><span>“{{formData.englishName}}”</span><br/>
        昵称：<input type="text" v-model.lazy.trim="formData.nickName"><span>“{{formData.nickName}}”</span><br/>
        体重：<input type="text" v-model.number="formData.weight">kg<span>“{{formData.weight}}”</span><br/>
    </main>
</body>
<script src="../vue.min.js"></script>
<script>
    new Vue({
        el: "#app",
        data() {
            return {
                formData: {
                    name: "奉先",
                    englishName: "Hydra",
                    nickName: "降龙狂魔",
                    weight: "82.5"
                }
            }
        }
    })
</script>
</html>